/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.ufrpe.bsi.pvs.view;

import br.ufrpe.bsi.pvs.view.admin.TelaLogin;
import br.ufrpe.bsi.pvs.view.assistant.TelaAssistente;
import java.awt.Color;

/**
 *
 * @author sergio
 */
public class TelaHome extends javax.swing.JPanel {

    public static TelaHome INSTANCE = new TelaHome();
    
    /**
     * Creates new form TelaHome
     */
    private TelaHome() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lbUserAcess = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        lbAssistant = new javax.swing.JLabel();

        setBackground(java.awt.Color.white);

        lbUserAcess.setFont(new java.awt.Font("Gabriola", 0, 18)); // NOI18N
        lbUserAcess.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lbUserAcess.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/user.png"))); // NOI18N
        lbUserAcess.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        lbUserAcess.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbUserAcessMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                lbUserAcessMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lbUserAcessMouseExited(evt);
            }
        });

        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/pvs-logo.png"))); // NOI18N

        jPanel1.setOpaque(false);
        jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 35));

        lbAssistant.setBackground(java.awt.Color.black);
        lbAssistant.setFont(new java.awt.Font("Gabriola", 0, 24)); // NOI18N
        lbAssistant.setForeground(new java.awt.Color(254, 254, 254));
        lbAssistant.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbAssistant.setText("Entrar");
        lbAssistant.setOpaque(true);
        lbAssistant.setPreferredSize(new java.awt.Dimension(250, 50));
        lbAssistant.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbAssistantMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                lbAssistantMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lbAssistantMouseExited(evt);
            }
        });
        jPanel1.add(lbAssistant);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 926, Short.MAX_VALUE)
                        .addComponent(lbUserAcess, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbUserAcess, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void lbUserAcessMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbUserAcessMouseClicked
        PvsFrame.INSTANCE.show(TelaLogin.INSTANCE);
    }//GEN-LAST:event_lbUserAcessMouseClicked

    private void lbUserAcessMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbUserAcessMouseEntered
        lbUserAcess.setText("Acesso do Funcionario");
    }//GEN-LAST:event_lbUserAcessMouseEntered

    private void lbUserAcessMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbUserAcessMouseExited
        lbUserAcess.setText("");
    }//GEN-LAST:event_lbUserAcessMouseExited

    private void lbAssistantMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbAssistantMouseClicked
        PvsFrame.INSTANCE.home();
    }//GEN-LAST:event_lbAssistantMouseClicked

    private void lbAssistantMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbAssistantMouseEntered
        lbAssistant.setBackground(new Color(70, 70, 70));
    }//GEN-LAST:event_lbAssistantMouseEntered

    private void lbAssistantMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbAssistantMouseExited
        lbAssistant.setBackground(Color.BLACK);
    }//GEN-LAST:event_lbAssistantMouseExited


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel lbAssistant;
    private javax.swing.JLabel lbUserAcess;
    // End of variables declaration//GEN-END:variables
}
